{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication\Log\4_3_Figures_Appendix_CHES.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}29 Aug 2024, 15:44:58

{com}. do "C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication\Do\4_3_Figures_Appendix_CHES.do"
{txt}
{com}. *****************************************************************************
. *                                 Figure Additional Context CHES                                        *
. *                                                                                                                                                       *                       
. * Author:                       Valentina Gonzalez Rostani                                                      *
. * Contact:                      mag384@pitt.edu                                                                 *
. * Date:                         August 9 2024                                                                                   *
. * Version:                      Stata 17                                                                                                *                                                                          
. *                                                                                                                                                       *
. *****************************************************************************
. /*
> This do-file:
> - Creates Figure A4 using data from CHES. 
> 
> Input:
> - Data\1999-2019_CHES_dataset_means(v3).dta
> 
> Output:
> - Figure A4: Number of Radical Right Parties in the Party System [Figures\NewParty.pdf]
> 
> */
. 
. *Defining Directory
. cd "C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication"
{res}C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication
{txt}
{com}. 
. *Calling the data
. use "Data\1999-2019_CHES_dataset_means(v3).dta", clear 
{txt}
{com}. 
. *******************************************************************************
. * Preparing variables
. *******************************************************************************
. {c -(}
. gen radright=1 if family==1
{txt}(1,077 missing values generated)
{com}. replace radright=0 if family>1
{txt}(1,077 real changes made)
{com}. {c )-}
{txt}
{com}. ******************************************************************************
. * Graph
. ******************************************************************************
. * Graph style 
. {c -(}
. grstyle clear
. set scheme s2color
. grstyle init
{res}{com}. grstyle set plain, box
. grstyle color background white
. grstyle set color dknavy
{res}{com}. grstyle yesno draw_major_hgrid yes
. grstyle yesno draw_major_ygrid yes
. grstyle color major_grid gs8
. grstyle linepattern major_grid dot
. grstyle color ci_area gs12%50
.  graph set window fontface "Georgia"
. {c )-}
{txt}
{com}. // Figure A4: Number of Radical Right Parties in the Party System
. {c -(}
. preserve
. collapse (sum) radright, by(year)  // Collapse the data by summing the 'radright' variable for each year
{res}{com}. 
. line radright year, ytitle("Number of Radical Right Parties", size(small))   xtitle("Year", size(small))  
{res}{com}. graph export "Figure\NewParty.pdf", as(pdf) replace
{txt}{p 0 4 2}
file {bf}
Figure\NewParty.pdf{rm}
saved as
PDF
format
{p_end}
{com}. 
. restore
. {c )-}
{txt}
{com}. 
{txt}end of do-file

{com}. exit, clear
